﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Marmat.Foundation
{
    /// <summary>
    /// 主窗体标准接口
    /// </summary>
    public interface IMainForm
    {
        /// <summary>
        /// 显示主窗体。
        /// </summary>
        /// <returns></returns>
        DialogResult ShowDialog();

        /// <summary>
        /// 窗体图标
        /// </summary>
        System.Drawing.Icon Icon { get; set; }

        /// <summary>
        /// 用户昵称
        /// </summary>
        string NickName { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        string Text { get; set; }

        /// <summary>
        /// 添加窗口
        /// </summary>
        /// <param name="form"></param>
        void AddForm(System.Windows.Forms.Form form);

        /// <summary>
        /// 主窗体已打开的窗体集合。
        /// </summary>
        System.Windows.Forms.Form[] Forms { get; }

        /// <summary>
        /// 获取或设置当前选中的窗体名称。
        /// </summary>
        string SelectedFormName { get; set; }

        /// <summary>
        /// 是否存在指定名称的窗体
        /// </summary>
        /// <param name="name">窗体名称</param>
        /// <returns></returns>
        bool ContainsForm(string name);
    }
}
